package cn.edu.thu.tsquality.core.common.table;

import java.util.Iterator;

/**
 * Created by wangyihan  on 2018/4/3 下午2:35. E-mail address is yihanwang22@163.com. Copyright © 2017
 * wangyihan. All Rights Reserved.
 *
 * @author wangyihan
 */
public class TableIterator implements Iterator<Row> {

  private final StreamingTable _table;

  public TableIterator(StreamingTable table) {
    this._table = table;
  }

  @Override
  public boolean hasNext() {
    return _table.hasNext();
  }

  @Override
  public Row next() {
    return _table.nextRow();
  }

  @Override
  public void remove() {
    throw new UnsupportedOperationException("Not support remove operation");
  }
}
